<template>
	<view class="app-content">
		<view class="title">
			简介
		</view>
		<view class="content">
			<u--textarea class="textarea" v-model="content" placeholder="请输入..." count height="100" maxlength='60'></u--textarea>
		</view>
		<view class="bottom">
			<view class="btn" @click="submit">保存</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
			};
		},
		onLoad(e){
			this.content = e.content
		},
		methods: {
			submit() {
				const updatedItem = {
					content: this.content,
				};
				const pages = getCurrentPages();
				const prevPage = pages[pages.length - 2];

				uni.navigateBack({
					success: () => {
						// prevPage.onShow();
						prevPage.$vm.receiveJianjie(updatedItem);
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	.app-content {
		height: 100vh;
		background-color: #FFFFFF;
	}

	.content {
		padding: 15rpx 25rpx;
	}
	
	.textarea{
		background: #F6F6F6;
		border: none;
	}
	.textarea::v-deep .u-textarea__count{
		background-color: transparent!important;
	}
	.title {
		font-size: 14px;
		font-weight: normal;
		line-height: 22px;
		letter-spacing: 0px;
		color: #333333;
		padding: 20rpx 30rpx 0;
	}

	.bottom {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		background-color: #ffffff;
		z-index: 1;

		.btn {
			font-weight: bold;
			font-size: 28rpx;
			color: #FFFFFF;
			line-height: 38rpx;
			text-align: center;
			line-height: 88rpx;
			margin: 15rpx 64rpx;
			background: #FF5866;
			border-radius: 102px;
			border: 1px solid #FF5866;
		}
	}
</style>